<?php

namespace Nhan\Realtime;

use Ratchet\ConnectionInterface;

class ClientConnection implements ClientConnectionInterface
{
    protected $connection;

    protected $name;

    protected $id;

    public function getResourceId() {
        return $this->getConnection()->resourceId;
    }
    
    public function getConnection()
    {
        return $this->connection;
    }

    public function setConnection(ConnectionInterface $conn)
    {
        $this->connection = $conn;
        return $this;
    }

    public function getId()
    {
        return $this->id;
    }

    public function setId($id)
    {
        $this->id = $id;
        return $this;
    }

    public function getName()
    {
        return $this->name;
    }

    public function setName($name)
    {
        $this->name = $name;
        return $this;
    }
}